1. Technology field
The present invention is related to a data access method, and more particularly, to a data access method for accessing a flash memory, and a storage system, and a controller using the same.
2. Description of Related Art
Digital cameras, mobile phones, and MP3 players have grown rapidly in recent years, which result in a rapid increase in demand of storage media by consumers. Flash memory is very suitable to be embedded in every kind of portable multimedia device described previously due to its characteristics such as data non-volatility, low power consumption, small volume, and non-mechanical structure. Besides, storage devices using NAND flash memory or NOR flash memory as storage media (e.g., a memory card) have been widely applied in storing personal important data due to small volume, large storage capacity, and convenience of being carried around, whereby flash memory industry becomes quite popular in electronics industry in recent years.
Generally speaking, flash memory of the storage system is divided into a plurality of physical blocks, and the physical blocks are grouped into a data area and a spare area. The physical blocks grouped as the data area store valid data written by the write command, and the physical blocks in the spare area are used to substitute the physical blocks in the data area when the write command is executed. More specifically, when the storage system receives the write command from a host and is about to write data into the physical blocks to be updated in the data area, the storage system selects one of the physical blocks from the spare area, and copies valid old data of the physical block to be updated in the data area, and writes the copied valid old data together with new data to be written into the physical block selected from the spare area. Then, the storage system links the physical block containing the new data to the data area, and erases the physical block to be updated and links the erased physical block to the spare area.
In order to enable the host to access the physical blocks which store the data in an alternation manner, the storage system provides the host with the logical blocks to access data. More specifically, the storage system maintains a logical block-physical block mapping table in which a mapping relationship between the logical blocks and the physical blocks in the data area is recorded. Meanwhile, when the write command is executed by the storage system such that the physical blocks of the data area are substituted with the physical blocks of the spare area, the storage system updates the logical block-physical block mapping table for correctly accessing the data later on.
In addition, in order to correctly utilize the physical blocks of the spare area, the storage system records transient information of each set of mother-child blocks between the spare area and the data area in one variable table.
When the transient information of any one set of mother-child blocks between the spare area and the data area is changed, the above-described variable table is required to be updated. However, in a case where memory volume of the storage system becomes larger such that a larger variable table is required, time required for updating the variable table becomes too long, whereby performance of the storage system becomes low.
Nothing herein should be construed as an admission of knowledge in the prior art of any portion of the present invention. Furthermore, citation or identification of any document in this application is not an admission that such document is available as prior art to the present invention, or that any reference forms a part of the common general knowledge in the art.